package org.s45.erp.api;


import org.s45.erp.common.pojo.entities.Supplier;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@FeignClient(contextId = "remoteSupplierService",
        name = "jshERP-boot",
        path = "/jshERP-boot/api/supplier")
public interface RemoteSupplierService {
    @GetMapping("/getSupplier/{id}")
    public Supplier getSupplier(@PathVariable("id") Long id);

    @GetMapping("/updateAdvanceIn")
    public int updateAdvanceIn(@RequestParam("supplierId") Long supplierId,
                               @RequestParam("advanceIn") BigDecimal advanceIn);
}
